﻿@model RH.Web.ViewModels.TransactionDetailViewModel
@using RH.Web.Utility

@{
	String pageTitle = "Edit TransactionDetail";
    if (Model != null && Model.ID == 0)
    {             
        pageTitle = "Add New TransactionDetail";
    }
    ViewBag.Title = Html.GetPageTitle(pageTitle);    
}
<div class="page-heading">
    <h1>@pageTitle</h1>
    <div>
        Enter necessary information and then click the Save button.        
    </div>
</div>

@Html.JavaScript("jquery.validate.min.js", Url)
@Html.JavaScript("jquery.validate.unobtrusive.min.js", Url)

<div class="GroupBox">
@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)

	if (Model == null)
    {
        @: @Html.ErrorMessageBox("Sorry! Requested TransactionDetail was not found for edit.")
    }
	else
	{
		@Html.HiddenFor(model => model.ID)

		<div class="editor-label">
			@Html.LabelFor(model => model.TransactionID)
		</div>
		<div class="editor-field">
			@Html.EditorFor(model => model.TransactionID)
			@Html.ValidationMessageFor(model => model.TransactionID)
		</div>
		<div class="editor-label">
			@Html.LabelFor(model => model.ProductID)
		</div>
		<div class="editor-field">
			@Html.EditorFor(model => model.ProductID)
			@Html.ValidationMessageFor(model => model.ProductID)
		</div>
		<div class="editor-label">
			@Html.LabelFor(model => model.ReceiveQuantity)
		</div>
		<div class="editor-field">
			@Html.EditorFor(model => model.ReceiveQuantity)
			@Html.ValidationMessageFor(model => model.ReceiveQuantity)
		</div>
		<div class="editor-label">
			@Html.LabelFor(model => model.IssueQuantity)
		</div>
		<div class="editor-field">
			@Html.EditorFor(model => model.IssueQuantity)
			@Html.ValidationMessageFor(model => model.IssueQuantity)
		</div>
		<div class="editor-label">
			@Html.LabelFor(model => model.UnitPrice)
		</div>
		<div class="editor-field">
			@Html.EditorFor(model => model.UnitPrice)
			@Html.ValidationMessageFor(model => model.UnitPrice)
		</div>
		<div class="editor-label">
			@Html.LabelFor(model => model.UomID)
		</div>
		<div class="editor-field">
			@Html.EditorFor(model => model.UomID)
			@Html.ValidationMessageFor(model => model.UomID)
		</div>
		<div class="editor-label">
			@Html.LabelFor(model => model.CurrentStockQuantity)
		</div>
		<div class="editor-field">
			@Html.EditorFor(model => model.CurrentStockQuantity)
			@Html.ValidationMessageFor(model => model.CurrentStockQuantity)
		</div>
		<div class="editor-label">
			@Html.LabelFor(model => model.PhysicalStockQuantity)
		</div>
		<div class="editor-field">
			@Html.EditorFor(model => model.PhysicalStockQuantity)
			@Html.ValidationMessageFor(model => model.PhysicalStockQuantity)
		</div>
		<div class="editor-label">
			@Html.LabelFor(model => model.ItemQuality)
		</div>
		<div class="editor-field">
			@Html.EditorFor(model => model.ItemQuality)
			@Html.ValidationMessageFor(model => model.ItemQuality)
		</div>
		<div class="editor-label">
			@Html.LabelFor(model => model.Description)
		</div>
		<div class="editor-field">
			@Html.EditorFor(model => model.Description)
			@Html.ValidationMessageFor(model => model.Description)
		</div>
		<div class="editor-label">
			@Html.LabelFor(model => model.SalePrice)
		</div>
		<div class="editor-field">
			@Html.EditorFor(model => model.SalePrice)
			@Html.ValidationMessageFor(model => model.SalePrice)
		</div>
		<div class="editor-label">
			@Html.LabelFor(model => model.IsPost)
		</div>
		<div class="editor-field">
			@Html.EditorFor(model => model.IsPost)
			@Html.ValidationMessageFor(model => model.IsPost)
		</div>
		@Html.HiddenFor(model => model.CreatedOn)
		@Html.HiddenFor(model => model.CreatebBy)
		@Html.HiddenFor(model => model.ModifiedOn)
		@Html.HiddenFor(model => model.ModifiedBy)
		<div>
			<input type="submit" value="Save" /> @Html.ActionLink("Back to List", "List")
		</div>
	}
}
</div>

